package ch2;

import java.util.ArrayList;
import java.util.List;

public class P1_HeepOOM {
    /**
     * Args：-Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
     */
    public static void main(String[] args) {
        List<Object> list = new ArrayList<Object>();
        while (true) {
            list.add(new Object());
        }
    }

}
